# vi: syntax=python:et:ts=4
Import("env")

sources = Glob("*.cpp", source = True, strings = True)
sources += ["tinyxml/tinyxml.cpp", "tinyxml/tinyxmlerror.cpp", "tinyxml/tinyxmlparser.cpp"]
sources += SConscript("audio/SConscript")
sources.remove("main.cpp")
if env["use_pango"]:
    sources.remove("text.cpp")
    sources.remove("ttf_text.cpp")
    pango_env = env.Clone()
    pango_env.Append(CPPDEFINES = "USE_PANGO")
    sources.extend(pango_env.Object(source = "text.cpp"))
else:
    sources.remove("pango_text.cpp")
lib_silvertree = env.StaticLibrary("libsilvertree", sources)
silvertree = env.Program("silvertreerpg", ["main.cpp", lib_silvertree])

Export("lib_silvertree")
editor = SConscript("editor/SConscript")
SConscript("eigen/SConscript")
silvertree_and_editor = (silvertree, editor)
Return("silvertree_and_editor")
